//
//  TimeCell.m
//  Zhiche-Carriage
//
//  Created by LeeBruce on 16/6/14.
//  Copyright © 2016年 LeeBruce. All rights reserved.
//

#import "TimeCell.h"
#import <Masonry.h>

@implementation TimeCell
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self initSubViews];
    }
    
    return self;
}

-(void)initSubViews
{
    __weak typeof(self) weakSelf = self;

    self.imageV = [[UIImageView alloc]init];
    [self.contentView addSubview:self.imageV];
    [self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(18);
        make.centerY.equalTo(weakSelf.contentView);
        make.size.mas_equalTo(CGSizeMake(17, 13));
        
        
    }];
    
    
    self.statusL = [[UILabel alloc]init];
    [self.contentView addSubview:self.statusL];
    [self.statusL mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.left.equalTo(weakSelf.imageV.mas_right).with.offset(9);
        make.top.mas_offset(0);
        make.size.mas_offset(CGSizeMake(80, cellHeight));
        
    }];
    
    self.statusL.font = Font(13);
    self.statusL.textColor = fontGrayColor;
    self.statusL.text = @"";
    
    self.dateLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.dateLabel];
    [self.dateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.left.equalTo(weakSelf.statusL.mas_right).offset(0);
        make.top.mas_offset(0);
        make.size.mas_offset(CGSizeMake(screenWidth - 120, cellHeight));
    }];
    
    self.dateLabel.text = @"2016-07-11 ";
    self.dateLabel.font = Font(13);
    self.dateLabel.textColor = littleBlackColor;

    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
